﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

using HsTec.Mobile.Green.Util;

public partial class Plan_ImpportPlan : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btn_Statistics_Click(object sender, EventArgs e)
    {
        //3.文件上传
        switch (Util.Upload_File(FU_Statistics, FU_Statistics.FileName, "Phase2\\Plan"))
        {
            case 1:
                Text_Confirm_Upstate.Text = "上传文件成功！";
                break;
            case 0:
                Text_Confirm_Upstate.Text = "上传文件失败！";
                return;
        }
        //4.分析上传文件，并导入数据库
        Text_Confirm_Upstate.Text = String.Empty;
        ReportHelper rhelper = new ReportHelper();
        //指明插入的数据表
        rhelper.tableName = "tb_Plan";
        //指明数据表对应的EXCEL文件
        rhelper.excelPath = "Phase2\\Plan\\" + FU_Statistics.FileName;
        int iEditer = 0;
        Text_Confirm_Upstate.Text = rhelper.importReport();
    }
}
